<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\NewsCategory */

$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common', 'news_category'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="news-category-view">

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            //'id',
            'name',
            [
                'attribute' => Yii::t('common', 'parent_category'),
                'value' => $model->parent_id == 0 ? '--' : \common\models\ExhibitionCategory::getExhibitionCategoryName($model->parent_id),
            ],
            'icon:html',
            'order',
            [
                'attribute' => Yii::t('common', 'status'),
                'value' => \common\helpers\TStringHelper::getStatusText($model->status),
            ],
            [
                'attribute' => Yii::t('common', 'created_at'),
                'value' => \common\helpers\TStringHelper::ShowDate($model->created_at, 1),
            ],
        ],
    ]) ?>

</div>
